package com.itheima.controller;

import com.itheima.entity.Account;
import com.itheima.service.AccountService;
import com.itheima.service.Impl.AccountServiceImpl;

public class AccountController {
    /**
     * 耦合和解耦的理解与操作
     */
    //private AccountService accountService = new AccountServiceImpl();
    //去耦合
    private AccountService accountService;
    public void save(Account account) {
        accountService.save(account);
    }

    public void setAccountService(AccountService accountService) {
        this.accountService = accountService;
    }

}
